/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.actions;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;

/**
 *
 * @author dario
 */
public class ListadoVotosNickForm extends org.apache.struts.action.ActionForm {
    
    private String nick;

    public ListadoVotosNickForm() {super();}
    public String getNick() {return nick;}
    public void setNick(String nick) {this.nick = nick;}


@Override
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
        ActionErrors errors = new ActionErrors();

        if(getNick().isEmpty()){errors.add("errorNick", new ActionMessage("listadoVotosNick.nickVacio"));}
        return errors;

    }
}
